﻿<?xml version="1.0" encoding="utf-8"?>
<!--
   Copyright (C) 2009 Choonghwan Lee (linjus.lee@gmail.com)
  
   This file is part of amanda.
  
   amanda is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.
  
   amanda is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
   GNU General Public License for more details.
  
   You should have received a copy of the GNU General Public License
   along with amanda. If not, see <http://www.gnu.org/licenses/>.
-->
<xs:schema id="Device"
    targetNamespace="http://tempuri.org/Device.xsd"
    elementFormDefault="qualified"
    xmlns="http://tempuri.org/Device.xsd"
    xmlns:mstns="http://tempuri.org/Device.xsd"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
  <xs:simpleType name="Encoding">
    <xs:restriction base="xs:string">
      <xs:enumeration value="MP3" />
      <xs:enumeration value="OGG" />
      <xs:enumeration value="FLAC" />
      <xs:enumeration value="ETC" />
    </xs:restriction>
  </xs:simpleType>

  <xs:complexType name="EncodingRule">
    <xs:choice minOccurs="1" maxOccurs="unbounded">
      <xs:element name="Type" type="mstns:Encoding" />
    </xs:choice>
  </xs:complexType>

  <xs:simpleType name="TextRule">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NONE" />
      <xs:enumeration value="LATIN" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="ArtworkRule">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NONE" />
      <xs:enumeration value="EMBED" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="StructureRule">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NONE" />
      <xs:enumeration value="ONELEVEL" />
    </xs:restriction>
  </xs:simpleType>
  
  <xs:element name="DeviceInfo">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Encoder" type="mstns:EncodingRule" />
        <xs:element name="Text" type="mstns:TextRule" />
        <xs:element name="Artwork" type="mstns:ArtworkRule" />
        <xs:element name="Structure" type="mstns:StructureRule" />
      </xs:sequence>
      <xs:attribute name="Name" type="xs:string" use="required" />
    </xs:complexType>
  </xs:element>
</xs:schema>
